package com.lei.demo.simple.factory;

import com.lei.demo.simple.Mainboard;
import com.lei.demo.simple.impl.AmdMainboard;
import com.lei.demo.simple.impl.IntelMainboard;

/**
 * 主板工厂类
 * @author chenhs
 * @time 2016年1月7日 上午11:12:54
 */
public class MainboardFactory {
	
	public static Mainboard createMainboard(int type){
		Mainboard mainboard = null;
		
		if(type == 1){
			mainboard = new IntelMainboard(755);
		}else if(type == 2){
			mainboard = new AmdMainboard(938);
		}
		
		return mainboard;
	}
}
